package com.zksb.service;

import com.zksb.entity.Goods;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public interface CartService {

    //添加到购物车
    int add(HttpServletRequest request, HttpServletResponse response, Integer goodsId, Integer quantity);

    //修改购物车的商品数量
    Goods update(HttpServletRequest request, HttpServletResponse response, Integer goodsId, Integer quantity);

    //从购物车删除商品
    int delete(HttpServletRequest request, HttpServletResponse response, Integer goodsId);

    //获取购物车
    Map<Integer, Goods> getCart(HttpServletRequest request);
}
